import request from '@/utils/request'


//获取业主列表  ..
export function getList(data) {
  return request({
    url: '/user/proprietor/list',
    method: 'get',
    params: data
  })
}

//分页获取出入记录
export function getRecordList(data) {
  return request({
    url: '/user/proprietor/get_record_list',
    method: 'get',
    params: data
  })
}

//获取用户详情信息 
export function getDetail(id) {
  return request({
    url: '/user/proprietor/pro_detail' + id,
    method: 'get'
  })
}


//业主关联的物业列表 
export function proLinkBuilds(id) {
  return request({
    url: '/user/proprietor/pro_link_builds' + id,
    method: 'get'
  })
}

//业主关联业主list
export function proLinkPros(id) {
  return request({
    url: '/user/proprietor/pro_link_pros' + id,
    method: 'get'
  })
}


//业主迁出物业
export function proDeleteBuilds(id) {
  return request({
    url: '/user/proprietor/pro_delete_builds' + id,
    method: 'post'
  })
}


//关联账号
export function linkOldAcc(data) {
  return request({
    url: '/user/proprietor/link_old_acc',
    method: 'post',
    data

  })
}

//移除账号
export function proRemoveAcc(id) {
  return request({
    url: '/user/proprietor/pro_remove_acc' + id,
    method: 'post'
  })
}



//启用或者禁用 
export function disableOrEnable(id) {
  return request({
    url: '/user/proprietor/disableOrEnable'+id,
    method: 'post',

  })
}

//添加或者 修改业主
export function addOrUpdatePro(data) {
  return request({
    url: '/user/proprietor/add_or_update_pro',
    method: 'post',
    data

  })
}

//首页数据统计
export function homeDataCount() {
  return request({
    url: '/user/proprietor/home_data_count' ,
    method: 'get'
  })
}


// 批量导入业主
export function importBatch() {
  return process.env.VUE_APP_BASE_API + '/user/proprietor/import_batch';
}


